package com.qyhl.module_practice.volunteer.list;

import com.qyhl.webtv.commonlib.entity.civilized.PracticeIsVolunteerBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeVolunteerBean;

import java.util.List;

public class PracticeVolunteerPresenter implements PracticeVolunteerContract.PraciceVolunteerPresenter {
    private PracticeVolunteerModel mModel;
    private PracticeVolunteerContract.PracticeVolunteerView mView;

    PracticeVolunteerPresenter(PracticeVolunteerContract.PracticeVolunteerView mView) {
        this.mView = mView;
        this.mModel = new PracticeVolunteerModel(this);
    }

    @Override
    public void getList(String page) {
        mModel.getList(page);
    }

    @Override
    public void getOrgList(String orgId, String page) {
        mModel.getOrgList(orgId, page);
    }

    @Override
    public void getIsVolunteer(String phone) {
        mModel.getIsVolunteer(phone);
    }


    @Override
    public void doOrgSearch(String keyword, String page, String orgId) {
        mModel.doOrgSearch(keyword, page, orgId);
    }

    @Override
    public void doSearch(String keyword, String page) {
        mModel.doSearch(keyword, page);
    }

    @Override
    public void setList(List<PracticeVolunteerBean> beanList, boolean isMore) {
        mView.setList(beanList, isMore);
    }

    @Override
    public void setSearchList(List<PracticeVolunteerBean> beanList, boolean isMore) {
        mView.setSearchList(beanList, isMore);
    }

    @Override
    public void setIsVolunteer(PracticeIsVolunteerBean bean) {
        mView.setIsVolunteer(bean);
    }

    @Override
    public void setError(String msg, boolean isMore) {
        mView.setError(msg, isMore);
    }
}
